﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using PMSGSC.DAL;
using PMSGSC.BLL;
namespace PMSGSC.App
{
    public partial class frmRescheduleLog : DevExpress.XtraEditors.XtraForm
    {
        public frmRescheduleLog()
        {
            InitializeComponent();
        }
        public RescheduleLog res = new RescheduleLog();
        public string Title = "";
        public bool Option;
        private void btnOK_Click(object sender, EventArgs e)
        {
            res.Reason = txtReason.Text;
            bool result = RescheduleLog_BLL.Insert(res);
            Option = true;
            if (!result)
            {
                MessageBox.Show(Title);
            }
            this.Close();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            Option = false;
            this.Close();
        }

        private void frmRescheduleLog_Load(object sender, EventArgs e)
        {
            txtWO.Text = Title;
        }
    }
}